<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('Bdrunpeople/company_list/')}">团队管理</a></li>
        <li class="active"><a href="#')">团队添加</a></li>
    </ul>

    <form  id="myform2" name="fileinfo" class="form-horizontal js-ajax-form" action="{:U('Bdrunpeople/company_add')}" method="post" >

        <fieldset>
            <div class="control-group">
                <label class="control-label">城市:</label>
                <div class="controls">
                    <select onchange="CityChanged();" id="city"  name="city">
                        <option value="">==请选择省==</option>
                        <volist name="province_data" id="vo">
                            <option value="{$vo.id}">{$vo.name}</option>
                        </volist>
                    </select>
                    <select name="city_id" id="city_id">

                    </select>
                </div>
                <div class="control-group">
                    </div>
                <div class="control-group">
                    <label class="control-label">团队名称:</label>
                    <div class="controls">
                        <input style="width: 150px;" name="company_name" type="text" value="{$data.company_name}" required/>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">默认第一个显示:</label>
                    <div class="controls">
                        <select class="select_2" name="status" style="width: 70px;" >
                            <option value='0' {$data.status==0?selected:''}>否</option>
                            <option value='1' {$data.status==1?selected:''}>是</option>
                        </select>
                    </div>
                </div>

                    <div class="control-group">

                    </div>
                </table>
            </div>
        </fieldset>
        <div class="form-actions">
            <button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
        </div>
    </form>
</div>
<script>
    function CityChanged(province_id){

        $.ajax({
            url:"{:U('Operation/location_api')}",
            data:"province_id="+$("#city").val(),
            dataType:"JSON",
            success:function(ret){

                cmbAddOption(ret.retValue);
            }
        });
    }

    function cmbAddOption(ret)
    {
        $("#city_id").empty();
        var opetion = null;
        for(var i =0; i<ret.length;i++){
            opetion+= '<option value="'+ret[i].id+'">'+ret[i].city+'</option>';
        }
        $("#city_id").append(opetion);
    }
</script>
<script src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>

</body>
</html>